import request from '@/config/axios'

export interface HouseElecConfigVo {
  id: number
  houseId: number
  hxChargeTplId: number
  hxChargeTplName: number
  price: number
  overDraft: string
}


// 获取楼栋电表厂家（只取第一个）
export const getHouseElecFactoryCode = async (houseId: number) => {
  return await request.get({
    url: `/zwsj/house-elec-config/factory/of/house/${houseId}`
  })
}

// 楼栋电表参数设置
export const saveHouseElecConfig = async (data: HouseElecConfigVo) => {
  return await request.post({
    url: '/zwsj/house-elec-config/save',
    data: data
  })
}

// 获得楼栋电表参数设置
export const getHouseElecConfig = async (houseId: number) => {
  return await request.get({
    url: `/zwsj/house-elec-config/of/house/${houseId}`
  })
}
